<!DOCTYPE html>
<html>
<#include "../head.html">
    <body>
    <table class="mc">
        <tr>
            <td class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </td>
            <td class="mc-m">
                <div class="navToggle"></div>
            </td>
            <td class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="VIP审核">
                        <#include "banner.html">
                        <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                         <#if params?exists>		
                                   <#if params.get("username")?exists><#assign username=params.get("username")></#if>
				                    <#if params.get("kefu_username")?exists><#assign kefu_name=params.get("kefu_username")></#if>                   
  				                    <#if params.get("verify_type")?exists><#assign verify_type=params.get("verify_type")?number><#else><#assign verify_type=0></#if>
  				                    <#if params.get("verify_start_time")?exists><#assign verify_start_time=params.get("verify_start_time")></#if>
  				                    <#if params.get("verify_end_time")?exists><#assign verify_end_time=params.get("verify_end_time")></#if>
				                  </#if> 
				                  <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 end -->
                            <!--面包屑导航---}-->
<#if usercache??>
   <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                
                                    <form action="vip.html" method="post">
                                    <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 start -->
                                   	<div class="toolbor-module export">
                                    <input type="button" onClick="exportxls()" value="导出报表" class="input-button export-btn"/>
                                </div>
									<div class="toolbor-module search">    
                                        <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                    </div>   
                                  
				                     <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 end -->
				                  
                                    <div class="toolbor-module search">
                                        <input type="text" name="username" id="username" value="请输入用户名" data-value="请输入用户名"  class="search-value">
                                    </div>
                                    <div class="toolbor-module search">    
                                        <input type="text" name="kefu_name" id="kefu_name" value="请输入客服用户名" data-value="请输入客服用户名" class="search-value">
                                    </div>
                                    <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                                    <div class="toolbor-module search">    
                                        <div class="select-box" id="status">
                                            <div class="tag-select">全部</div>
                                            <ul class="tag-options">
                                                <li data-value="0" <#if status==0 >data-selected="selected"</#if> class="open-selected">全部</li>
                                                  <li data-value="2" <#if status==2>data-selected="selected"</#if>>等待审核</li>
                                                <li data-value="1" <#if status==1 >data-selected="selected"</#if>>审核通过</li>
                                                <li data-value="-1" <#if status==-1>data-selected="selected"</#if>>审核未通过</li>
                                            </ul>
                                        </div>
                                     </div>
                                     
                                       <div class="toolbor-module search">
	                                    <div style="height:22px;line-height:22px;float:left;">审核时间：</div>
	                                    <input class="_search-value js-datetime" name="verify_start_time" id="verify_start_time" value="${verify_start_time!}"/>
	                                    <div style="height:22px;line-height:22px;float:left;margin:0 8px;"> 到 </div>
	                                    <input class="_search-value js-datetime" name="verify_end_time" value="${verify_end_time!}" id="verify_end_time"/>
	                                     <input type="hidden" id="type" value="2"/>
	                                   </div>
	                               <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-21 end -->
	                                   
                                    </form>
                                </div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>用户名</td>
                                            <td>客服名称</td>
                                            <td>添加时间</td>
                                            <td>用户类型</td>
                                            <td>登录次数</td>
                                            <td>状态</td>
                                            <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                                            <td>vip赠送状态</td>
                                            <td>vip赠送月份</td>
                                            <td>vip有效期限</td>
                                            <td>vip截止时间</td>
                                            <td>vip剩余期限</td>
                                            <td>vip审核时间</td>
                                            <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 end -->
                                            <td>操作</td>
                                        </tr>
                                        
                                        <#if usercache??> <#list usercache as obj>
                                            <#assign vipStatus=obj.vip_status!(0)>
                                                <tr class="s">
                                                    <td>${obj.user_id!"-"}</td>
                                                    <td>${obj.username!"-"}</td>
                                                    <td>${obj.kefu_name!"-"}</td>
                                                    <td><#if obj.kefu_addtime??&&obj.kefu_addtime!="0">${dateformat(obj.kefu_addtime)}<#else>-</#if></td>
                                                    <td><#if obj.type_id??>${Typet(obj.type_id,"usertype")}<#else>-</#if></td>
                                                    <td>-</td>
                                                    <td>${obj.account_waitvip!"-"}</td>
                                                    <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                                                    <td><#if obj.vip_give_status==2>VIP赠送申请中<#elseif obj.vip_give_status==1>审核通过<#elseif  obj.vip_give_status==-1>申请不通过<#else>没有申请</#if></td></td>
                                                    <td>${obj.vip_give_month}</td>
                                                    <td id="valid_vip_time">${(obj.valid_vip_time)}天</td>
                                                    <td id="vip_end_time"><#if obj.vip_end_time??&&obj.vip_end_time!="0">${dateformat((obj.vip_end_time))}<#else>-</#if>
                                                    </td>
                                                    <td id="last_vip_time">${obj.last_vip_time!0}天</td>
                                                    <td><#if obj.vip_verify_time??&&obj.vip_verify_time!="0">${dateformat(obj.vip_verify_time)}<#else>-</#if></td>                                               
                                                   <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 end -->
                                                    <td><a href="${request.getContextPath()}/admin/attestation/viewvip.html?user_id=${obj.user_id?c}&type=${obj.type}">审核查看</a></td>
                                                </tr>
                                        </#list> </#if>
                                    </table>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container">
                                        <#import "../../common/page.html" as pager> <@pager.pagination page=page
                                            url="/admin/attestation/vip.html?status=${status}" map=params
                                            style="style1" />

                                    </div>
                                    <!--翻页系统--}-->
                                </div>
<#else>
                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                            	<form action="vip.html" method="post">
                            	<!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 start -->
                                   	<div class="toolbor-module export">
                                    <input type="button" onClick="exportxls()" value="导出报表" class="input-button export-btn"/>
                                </div>
									<div class="toolbor-module search">    
                                        <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                    </div>   
                                    
				                     <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 end -->
                                	<div class="toolbor-module search">
                                        <input type="text" name="username" id="username" value="请输入用户名" data-value="请输入用户名"  class="search-value">
                                     </div>
                                 	<div class="toolbor-module search">       
                                        <input type="text" name="kefu_name" id="kefu_name" value="请输入客服用户名"  data-value="请输入客服用户名" class="search-value">
                                 	</div>
                                 	<div class="toolbor-module search">      
                                        <div class="select-box" id="status">
                                            <div class="tag-select">全部</div>
                                            <ul class="tag-options">
                                                <li data-value="0" <#if status==0 >data-selected="selected"</#if> class="open-selected">全部</li>
                                                  <li data-value="2" <#if status==2>data-selected="selected"</#if>>等待审核</li>
                                                <li data-value="1" <#if status==1 >data-selected="selected"</#if>>审核通过</li>
                                                <li data-value="-1" <#if status==-1>data-selected="selected"</#if>>审核未通过</li>
                                            </ul>
                                        </div>
                                    </div>
                                    <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 start -->
                                     
                                       <div class="toolbor-module search">
	                                    <div style="height:22px;line-height:22px;float:left;">审核时间：</div>
	                                    <input class="_search-value js-datetime" name="verify_start_time" id="verify_start_time" value="${verify_start_time!}"/>
	                                    <div style="height:22px;line-height:22px;float:left;margin:0 8px;"> 到 </div>
	                                    <input class="_search-value js-datetime" name="verify_end_time" value="${verify_end_time!}" id="verify_end_time"/>
	                                     <input type="hidden" id="type" value="2"/>
	                                   </div>
	                               <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 end -->
                                 </form>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>用户名</td>
                                            <td>客服名称</td>
                                            <td>添加时间</td>
                                            <td>用户类型</td>
                                            <td>登录次数</td>
                                            <td>状态</td>
                                            <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                                              <td>vip有效期限</td>
                                            <td>vip截止时间</td>
                                            <td>vip剩余期限</td>
                                            <td>vip审核时间</td>
                                            <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 end -->
                                            
                                            <td>操作</td>
                                        </tr>
                                        <#if vipinfo??> <#list vipinfo as obj>
                                            <#assign vipStatus=obj.vip_status!(0)>
                                                <tr class="s">
                                                    <td>${obj.user_id!"-"}</td>
                                                    <td>${obj.username!"-"}</td>
                                                    <td>${obj.kefu_name!"-"}</td>
                                                    <td><#if obj.kefu_addtime??&&obj.kefu_addtime!="0">${dateformat(obj.kefu_addtime)}<#else>-</#if></td>
                                                    <td><#if obj.type_id??>${Typet(obj.type_id,"usertype")}<#else>-</#if></td>
                                                    <td>-</td>
                                                    <td><#if vipStatus==2>VIP申请中<#elseif vipStatus==1>审核通过<#elseif vipStatus==-1>申请不通过<#else>没有申请</#if></td>
                                                     <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                                                     <td id="valid_vip_time">${(obj.valid_vip_time!0)}天</td>
                                                    <td id="vip_end_time"><#if obj.vip_end_time??&&obj.vip_end_time!="0">${dateformat((obj.vip_end_time))}<#else>-</#if>
                                                    </td>
                                                    <td id="last_vip_time">${obj.last_vip_time!0}天</td>
                                                    <td><#if obj.vip_verify_time??&&obj.vip_verify_time!="0">${dateformat(obj.vip_verify_time)}<#else>-</#if></td>     
                                                    <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 end -->
                                                    <td><a href="${request.getContextPath()}/admin/attestation/viewvip.html?user_id=${obj.user_id?c}">审核查看</a></td>
                                                </tr>
                                        </#list> </#if>
                                    </table>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container">
                                        <#import "../../common/page.html" as pager> <@pager.pagination page=page
                                            url="/admin/attestation/vip.html?status=${status}" map=params
                                            style="style1" />

                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                </#if>
                                <!--底部工具栏--}-->
								<script type="text/javascript">
                                <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 start -->
							    var verify_type=5;
								 var url = 'vip.html?search=true';
								 var xlsurl = 'vip.html?actiontype=export';
								  function sousuo(){
                                      var sou = "";
                                      var username = $("#username").val();
                                      var type=$("#type").val();
                                      var kefu_name = $("#kefu_name").val();
                                      if (username!=""&&username!="请输入用户名"){
                                          sou += "&username="+username;
                                      }
                                      if (kefu_name!=""&&kefu_name!="请输入客服用户名"){
                                          sou += "&kefu_name="+kefu_name;
                                      }
                                      var status = $("#status").find(".open-selected").attr("data-value");
                                      if (status!=null&&status!=""&&status!="undefine"){
                                          sou += "&status="+status;
                                      }
                                      <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                                      var verify_start_time = $("#verify_start_time").val();
                                      var verify_end_time = $("#verify_end_time").val();
                                      if (verify_start_time!=null){
                                          sou += "&verify_start_time="+verify_start_time;
                                      }
                                      if (verify_end_time!=null){
                                          sou += "&verify_end_time="+verify_end_time;
                                      }
                                      if(verify_type==5){
                                      	sou+="&verify_type="+verify_type;
                                      }
                                      <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 end -->
                                      if(type!=0){
                                    	  sou+="&type="+type;
                                      }

                                      if (sou!=""){
                                          location.href=url+sou;
                                      }
                                  }
								  function exportxls(){
									  var sou = "";
                                      var type=$("#type").val();
                                      var username = $("#username").val();
                                      var kefu_name = $("#kefu_name").val();
                                      if (username!=""&&username!="请输入用户名"){
                                          sou += "&username="+username;
                                      }
                                      if (kefu_name!=""&&kefu_name!="请输入客服用户名"){
                                          sou += "&kefu_name="+kefu_name;
                                      }
                                      var status = $("#status").find(".open-selected").attr("data-value");
                                      if (status!=null&&status!=""&&status!="undefine"){
                                          sou += "&status="+status;
                                      }
                                      <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 start -->
                                      var verify_start_time = $("#verify_start_time").val();
                                      var verify_end_time = $("#verify_end_time").val();
                                      if (verify_start_time!=null){
                                          sou += "&verify_start_time="+verify_start_time;
                                      }
                                      if (verify_end_time!=null){
                                          sou += "&verify_end_time="+verify_end_time;
                                      }
                                      if(verify_type==5){
                                      	sou+="&verify_type="+verify_type;
                                      }
                                      <!-- v1.6.7.1 RDPROJECT-384 wcw 2013-11-21 end -->
                                      if(type!=0){
                                    	  sou+="&type="+type;
                                      }
							            if (sou!=""){
							                location.href=xlsurl+sou;
							            }else{
							                location.href=xlsurl;
							            }
							        }
                                  <!-- v1.6.7.1  RDPROJECT-384 wcw 2013-11-05 end -->
								</script>
                            </div>

            </td>
        </tr>
        <tr>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </tr>
    </table>

    </body>
</html>
<#include "../jsPage.html">
